package com.rocksdata.mc.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;

import com.ctz.commonframe.ui.TitleBarActivity;
import com.rocksdata.mc.R;
import com.rocksdata.mc.entity.CourseInfo;
import com.rocksdata.mc.ui.fragment.DayTimetableFragment;

import org.xutils.view.annotation.ContentView;

import java.util.List;

/**
 * Created by 陈堂正 on 2017/6/6.
 */
@ContentView(R.layout.activity_single_fragment)
public class DayTimetableActivity extends TitleBarActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTitleMiddleText("天视图");
        setBackgroundColor(getResources().getColor(R.color.light_black));

        Intent intent = getIntent();
        List<CourseInfo> courseInfoList = (List<CourseInfo>) intent.getSerializableExtra("timetable_data");
        long dayMillis = intent.getLongExtra("timetable_date", 0);

        DayTimetableFragment fragment = new DayTimetableFragment();
        fragment.setArguments(intent.getExtras());
        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        ft.replace(R.id.layout_fragment, fragment);
        ft.commit();
//        fragment.setDatas(courseInfoList, dayMillis);
    }
}
